package com.shioirikukuri.service.impl;

import com.shioirikukuri.entity.ReservationServiceRel;
import com.shioirikukuri.mapper.ReservationServiceRelMapper;
import com.shioirikukuri.service.IReservationServiceRelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ReservationServiceRelServiceImpl implements IReservationServiceRelService {

	@Autowired
	private ReservationServiceRelMapper reservationServiceRelMapper;

	@Override
	public List<ReservationServiceRel> getAllReservationServiceRels() {
		return reservationServiceRelMapper.selectAllReservationServiceRels();
	}

	@Override
	public ReservationServiceRel getReservationServiceRelById(Integer relId) {
		return reservationServiceRelMapper.selectReservationServiceRelById(relId);
	}

	@Override
	public void createReservationServiceRel(ReservationServiceRel reservationServiceRel) {
		reservationServiceRelMapper.insertReservationServiceRel(reservationServiceRel);
	}

	@Override
	public void updateReservationServiceRel(ReservationServiceRel reservationServiceRel) {
		reservationServiceRelMapper.updateReservationServiceRel(reservationServiceRel);
	}

	@Override
	public void deleteReservationServiceRelById(Integer relId) {
		reservationServiceRelMapper.deleteReservationServiceRelById(relId);
	}
}
